package br.com.danilloguimaraes.serializacao;
import static org.junit.Assert.*;
import java.io.File;
import org.junit.BeforeClass;
import org.junit.Test;

/**
 *
 * @author danillo
 */
public class SedesTeste {
    
    private static File folder;
    static{
        StringBuilder sb = new StringBuilder();
        sb.append(System.getProperty("user.home")).
                append(System.getProperty("file.separator")).
                append("datafiles");
        folder = new File(sb.toString());
        folder.mkdir();
    }
    
    @Test
    public void testFolder(){
        assertTrue("Folder must exist", folder.exists());
        assertTrue("Folder must be a directory", folder.isDirectory());
    }
    
    public String createPath(String filename){
        StringBuilder sb = new StringBuilder();
        sb.append(folder.getPath()).
                append(System.getProperty("file.separator")).
                append(filename);
        return sb.toString();
    }
    
    
}
